// https://typescript.p6p.net/typescript-tutorial/interface.html
interface Person {
    firstName: string;
    lastName: string;
    age: number;
}

let tmp: any = {
    age: 10,
};

let tmp2: Person = tmp;
console.log(tmp2);

let p: Person = {
    firstName: "test",
    lastName: "test",
    age: 10,
};
p.firstName = "test1";

console.log(p);

interface Foo {
    a: string;
}
type A = Foo["a"]; // string

interface A1 {
    readonly a: string;
}

let a1: A1 = {
    a: "test",
};

interface A2 {
    [prop: number]: string;
}

const obj: A2 = ["a", "b", "c"];
console.log(obj[0]);
